const Router = require('koa-router');
const shopRouter = new Router({ prefix: "/shop/content" });
shopRouter.get('/', (ctx, next) => {

  // ctx.res.setHeader('Access-Control-Allow-Origin', '*');
  // ctx.res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
  // ctx.res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type, Authorization');
  const data = [
    {
      _id: 1,
      name: "番茄250g/份",
      imgUrl: "",
      sales: 10,
      price: 33.6,
      oldPrice: 39.6
    },
    {
      _id: 2,
      name: "番茄250g/份",
      imgUrl: "",
      sales: 10,
      price: 33.6,
      oldPrice: 39.6
    },
    {
      _id: 3,
      name: "番茄250g/份",
      imgUrl: "",
      sales: 10,
      price: 33.6,
      oldPrice: 39.6
    },
  ]
  ctx.body = data;
})


module.exports = shopRouter;